# I/O流
# mode:w r a  wb rb ab

# f = open("1.txt", "w", encoding="utf8") #覆盖写入
# f.write("离离原上草")
# f.close()

# f1 = open("1.txt", "r", encoding="utf8")
# content = f1.read()
# print(content)
# f1.close()


# f1 = open("2.txt", "a", encoding="utf8")  # 追加写入
# f1.write("一岁一枯荣\n")
# f1.close()


# 二进制：图片 音频 视频
# f1 = open("1.txt", "rb")
# content = f1.read()
# print(content)
# f1.close()

# 读出来
# f2 = open("test.jpg", "rb")
# content = f2.read()
# print(content)
# f2.close()

# 写进去
# f3 = open("test1.jpg", "wb")
# f3.write(content)
# f3.close()
